<?php

class IndexAction extends Action {

    public function index() {
        $dao  =   M('ad');
        $data   =   $dao->order('cTime desc')->select();
        //dump($data);
        $this->assign('data', $data);
        $this->display();
    }
    
    function detail(){
    	$map['id'] = intval($_REQUEST['id']);
    	
    	$info = M('ad')->where($map)->find();
    	
    	$this->assign('info', $info);
    	
    	$this->display();
    }

}